import { ref, h } from "vue";
import { render } from "@/utils";
import TagStatus from "@/components/TagStatus/index.vue";

export const columns = [
  {
    title: "主机组名称",
    dataIndex: "name",
    fixed: "left",
    tooltip: true,
    ellipsis: true,
    render,
    width: 280,
  },
  {
    title: "显示名称",
    dataIndex: "displayName",
    tooltip: true,
    ellipsis: true,
    render,
    // width: 200,
  },
  {
    title: "信创",
    dataIndex: "xc",
    render: ({ record }) => h(TagStatus, { type: record.xc }),
  },
  {
    title: "资源类型",
    dataIndex: "type",
    tooltip: true,
    ellipsis: true,
    // width: 90,
    render,
  },
  {
    title: "架构",
    dataIndex: "architecture",
    // width: 90,
    render,
  },

  {
    title: "是否启用",
    dataIndex: "enable",
    slotName: "enable",
  },
  {
    title: "平台名称",
    dataIndex: "resourceType",
    tooltip: true,
    ellipsis: true,
    // width: 90,
    render,
  },
  {
    title: "集群",
    dataIndex: "cluster",
    tooltip: true,
    ellipsis: true,
    render,
  },
  {
    title: "操作",
    width: 120,
    dataIndex: "action",
    fixed: "right",
    slotName: "action",
  },
];
